import React, { Component } from 'react'
import axios from "axios"
import List from '../../component/List'
export class homeIndex extends Component {
  constructor(props) {
    super(props)
  
    this.state = {
       list:[]
    }
  }
  componentDidMount(){
    axios.get('/list').then((res)=>{
      this.setState({
        list:res.data
      })
    })
  }
  render() {
    const{list}=this.state
    return (
      <div>
        <List list={list}></List>
      </div>
    )
  }
}

export default homeIndex